package cn.selfiot.iotman.model.mqtt;

import cn.selfiot.iotman.model.MqttProjectConstants;

/**
 * LWT 配置
 *
 * @author hugo
 * @since 2020/8/1
 */
public class LwtModel {
    private String topic;
    private String payload;
    private Integer qos = Integer.valueOf(String.valueOf(MqttProjectConstants.QOS[0].getValue())).intValue();
    private Boolean retained = false;
    
    public String getTopic() {
        return topic;
    }
    
    public void setTopic(String topic) {
        this.topic = topic;
    }
    
    public String getPayload() {
        return payload;
    }
    
    public void setPayload(String payload) {
        this.payload = payload;
    }
    
    public Integer getQos() {
        return qos;
    }
    
    public void setQos(Integer qos) {
        this.qos = qos;
    }
    
    public Boolean getRetained() {
        return retained;
    }
    
    public void setRetained(Boolean retained) {
        this.retained = retained;
    }
    
    @Override
    public String toString() {
        return "LwtModel{" +
                "topic='" + topic + '\'' +
                ", payload='" + payload + '\'' +
                ", qos=" + qos +
                ", retained=" + retained +
                '}';
    }
}
